<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*,java.io.*,java.sql.*,InvestmentPojo.*;" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<title>Invesment In India</title>
<link href="images664/style.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<script type="text/javascript" src="images664/jquery-1.3.2.min.js"></script>
<% 
Properties props = new Properties(System.getProperties());
FileInputStream fis=new FileInputStream("D:/venki/Investment_In_India2/WebContent/WEB-INF/classes/ImmovableInIndia.properties");
props.load(fis);  

List optionsList123=new ArrayList();
Connection con=null;
String optionvalue="";
try{
	Class.forName("org.gjt.mm.mysql.Driver");
	con=DriverManager.getConnection("jdbc:mysql://204.93.216.11:3306/corp525_femadb","corp525_fema_usr","corp525_fema_pwd");
	Statement st=con.createStatement();
	
	ResultSet rs=st.executeQuery("select * from investment_in_india where form_id=2 ");
	
	while(rs.next()){
		OptionsList obj = new OptionsList();
		
		obj.setOptionId(rs.getString(1));
		obj.setListTypeId(rs.getString(2));
		obj.setOptionLabel(rs.getString(3));
		obj.setOptionValue(rs.getString(4));
		optionsList123.add(obj);
		
		
	}
}catch(Exception e ){
	e.printStackTrace();
	con.close();
}
%> 
<body bgcolor="blue">
<form name="frm">
<table width="800" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
</table>

<table width="900" align="center"  cellspacing ="0" cellpadding="0" valign="middle">
		<tr><td>&nbsp;</td></tr>
		<tr><td>&nbsp;</td></tr>
		</table>
		
		<table width="900" align="center"  border="0" cellspacing ="0" cellpadding="0" valign="middle">
		<tr><td class="animatedbgul"><h2>Tranferor</h2></td></tr>
		</table>
		
		<table width="900" align="center"  border="0" cellspacing ="0" cellpadding="0" valign="middle">
		<tr><td>&nbsp;</td></tr>
		<tr><td>&nbsp;</td></tr>
		</table>
		
		<table width="900" align="center" class="TDBBLRFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle">
		<tr>
		<td class="animatedbgul" id="test1form" callspan="1"><font>Transferor</font>&nbsp;&nbsp;&nbsp;<a href="javascript:lClick('1')">showAll</a></td>
		</tr>
		<% if(optionsList123 != null){
			
			for(int i=0;i<optionsList123.size();i++){
			OptionsList obj =(OptionsList)optionsList123.get(i); 
			if(obj.getListTypeId() != null && obj.getListTypeId().equals("1")){
			
			%>
			<tr id="litag<%=obj.getOptionValue()%>"><td>
			<font><input type="radio" name="qest" id="<%=obj.getOptionId()%>" value="<%= obj.getOptionValue()%>" onclick="onQuestClick('<%=obj.getOptionId() %>')"/>&nbsp;&nbsp;&nbsp;<%= obj.getOptionLabel()%></font></td></tr>
			<%	
			}
			}	  		
			
		} %>
	</table>

	<table width="800" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
	<tr><td>&nbsp;</td></tr>
	</table>
	<table width="900" align="center" class="TDBBLRFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle" id="TransfereeForSoftware">
	<tr>
	<td class="animatedbgul" id="test1form" callspan="1"><font>Tranferee</font> &nbsp;<a href="javascript:lClick('2')">showAll</a></td></tr>
		<% if(optionsList123 != null){
			for(int i=0;i<optionsList123.size();i++){
			OptionsList obj =(OptionsList)optionsList123.get(i); 
			if(obj.getListTypeId() != null && obj.getListTypeId().equals("2")){
			%>
			<tr id="transforee<%=obj.getOptionValue()%>"><td>
			<font><input type="radio" name="qest1" id="<%=obj.getOptionId()%>" value="<%= obj.getOptionValue()%>" onclick="onQuestClick1('<%=obj.getOptionId() %>')"/>&nbsp;&nbsp;&nbsp;<%= obj.getOptionLabel()%></font></td></tr>
			<%	
			}
			}	  		
		} %>
	</table>

	<table width="800" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
	<tr><td>&nbsp;</td></tr>
	</table>
	<table width="900" align="center" class="TDBBLRFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle" id="TypeOfProperty">
	<tr>
	<td class="animatedbgul" id="test1form" callspan="1"><font>Type of transfer</font>&nbsp;&nbsp;&nbsp;<a href="javascript:lClick('3')">showAll</a></td></tr>
		<% if(optionsList123 != null){
			for(int i=0;i<optionsList123.size();i++){
			OptionsList obj =(OptionsList)optionsList123.get(i); 
			if(obj.getListTypeId() != null && obj.getListTypeId().equals("3")){
			%>
			<tr id="transforor<%=obj.getOptionValue()%>"><td>
			<font><input type="radio" name="qest2" id="<%=obj.getOptionId()%>" value="<%= obj.getOptionValue()%>" onclick="onQuestClick2('<%=obj.getOptionId() %>')"/>&nbsp;&nbsp;&nbsp;<%= obj.getOptionLabel()%></font></td></tr>
			<%	
			
			}
			}	  		
			
		} %>
	</table>
	
<div id="table2">
<table width="800" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
</table>
<table width="900" align="center" class="TDBBLRFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr id="TR01"><td colspan="2" class="animatedbgul" id="test1form">
<font>Type Of Sector</font>
</td></tr>
<tr id="TR04"><td colspan="2" ><select style="width:700px; border-radius: 5px ;" name="toi" onChange="onSectorChange()" id="sectorid"><font><option default>-----------------------Select One--------------------</option>
<% if(optionsList123 != null){
	
	for(int i=0;i<optionsList123.size();i++){
		
	OptionsList obj =(OptionsList)optionsList123.get(i); 
	if(obj.getListTypeId() != null && obj.getListTypeId().equals("12")){
		//System.out.println("============================"+i);
	%>
	
	<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%= obj.getOptionValue()%>" title="<%= obj.getOptionLabel()%>"><%= obj.getOptionLabel()%></option>
	<%	
	}
	}	  	
} %>
</font>
</select></td></tr>
</table></div>
<script language='javascript' type='text/javascript'>
function onSectorChange(){
	var x=document.getElementById("sectorid").selectedIndex;
	var sectoroptionvalue=document.getElementById("sectorid").options;
	var subsectoroptionvalue = document.getElementById("subsectoroptionvalue");
	if(sectoroptionvalue != null ){
		switch(sectoroptionvalue[x].value){
		case '17':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML =='<option>Select One</option>';
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("13")){
				%>
				subsectoroptionvalue.innerHTML +="<option name='<%=obj.getOptionId()%>' id='<%=obj.getOptionId()%>' value='<%=obj.getOptionValue()%>' title='<%=obj.getOptionLabel()%>'><%=obj.getOptionLabel()%></option>";
				<%	
				}
				}	  		
			} %>
			subsectoroptionvalue = subsectoroptionvalue.trim;
			    break;
		case '18':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML="<option>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("14")){
				%>
				subsectoroptionvalue.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionLabel()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '19':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML="<option>Select One</option>"
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("15")){
				%>
				subsectoroptionvalue.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionLabel()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '25':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML="<option>Select One</option>"
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("16")){
				%>
				subsectoroptionvalue.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionLabel()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '28':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML="<option>Select One</option>"
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("17")){
				%>
				subsectoroptionvalue.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionLabel()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '30':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML="<option>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("18")){
				%>
				subsectoroptionvalue.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionLabel()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '31':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML="<option>Select One</option>"
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("19")){
				%>
				subsectoroptionvalue.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionLabel()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '38':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML="<option>Select One</option>"
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("20")){
				%>
				subsectoroptionvalue.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionLabel()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '45':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML="<option>Select One</option>"
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("22")){
				%>
				subsectoroptionvalue.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionLabel()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		case '47':
			document.getElementById("table3").style.display="";
			document.getElementById("table4").style.display="none";
			subsectoroptionvalue.innerHTML="<option>Select One</option>"
				//alert("function inside start......");
			<% if(optionsList123 != null){
				for(int i=0;i<optionsList123.size();i++){
				OptionsList obj =(OptionsList)optionsList123.get(i); 
				if(obj.getListTypeId() != null && obj.getListTypeId().equals("21")){
				%>
				subsectoroptionvalue.innerHTML +='<option name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionLabel()%>"><%=obj.getOptionLabel()%></option>'
				<%	
				}
				}	  		
			} %>
			    break;
		default :
				document.getElementById("table3").style.display="none";
				document.getElementById("table4").style.display="";
				subsectoroptionvalue.innerHTML=="<option>Select One</option>"
				<% if(optionsList123 != null){
					for(int i=0;i<optionsList123.size();i++){
					OptionsList obj =(OptionsList)optionsList123.get(i); 
					if(obj.getListTypeId() != null && obj.getListTypeId().equals("")){
					%>
					subsectoroptionvalue.innerHTML	+="<option name='<%=obj.getOptionId()%>' id='<%=obj.getOptionId()%>' value='<%=obj.getOptionValue()%>' title='<%=obj.getOptionLabel()%>'><%=obj.getOptionLabel()%></option>"
					<%	
					}
					}	  		
				} %>
		} 
}}
</script>
<div id="table3">
<table width="800" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
</table>
<table width="900" align="center" class="TDBBLRFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr>
<td class="animatedbgul" id="test1form"><font>Type Of Sub Sector</font></td>
</tr>

	<tr id="TR06"><td colspan="2" ><select style="width:700px; border-radius: 5px ;" name="toi" onChange="onSubSectorChange()" id="subsectoroptionvalue">&nbsp;</select></td></tr>
</table></div>
<div id="table8">
<table width="800" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
</table>
<table width="900" align="center" class="TDBBLRTFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr id="test1form"><td width="25%">
<font><b>Whether The Investee Is  &nbsp;</b></font></td>
<td width="75%"><b><input type="radio" value="Y" name="group2" id="repyes" onClick="clickRadioButtons2()">Repatriation&nbsp;&nbsp;<input type="radio" value="N" name="group2" id="nrepno" onClick="clickRadioButtons2()">Non Repatriation</b></td>
</tr></table>
</div>
<script>
function onSubSectorChange(){
	//alert("55555555555");
	document.getElementById("table8").style.display="";
	document.getElementById("table4").style.display="";
}
function clickRadioButtons2(){
	var repyes=document.getElementById("repyes");
	 var nrepno=document.getElementById("nrepno");
	 if(repyes.checked){
		 document.getElementById("table4").style.display="";
		}
	 if(nrepno.checked){
		 document.getElementById("table4").style.display="";
	 }
}
</script>
<div id="table4">
<table width="900" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
</table>
<table width="900" align="center" class="TDBBLRFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr>
<td class="animatedbgul" id="test1form"><font>Mode Of Investment &nbsp;<a style="display: none;" id="quest2" href="javascript:onQuestClick2('quest2')" value="show all" align="right">show all</a> </font></td>
</tr>

<% if(optionsList123 != null){
	for(int i=0;i<optionsList123.size();i++){
	OptionsList obj =(OptionsList)optionsList123.get(i); 
	if(obj.getListTypeId() != null && obj.getListTypeId().equals("23")){
	%>
	<tr id="invmode<%=i+1%>"><td>
	<font><input type="radio" name="qest2" id="<%=obj.getOptionId()%>" value="<%= obj.getOptionValue()%>" onclick="onQuestClick2('<%=obj.getOptionId() %>')"/>&nbsp;&nbsp;&nbsp;<%= obj.getOptionLabel()%></font></td></tr>
	<%	
	}
	}	  		
} %>
</table></div>

<div id="table5">
<table width="900" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
</table>
<table width="900" align="center" class="TDBBLRTFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle" id="test1form">
<tr><td width="70%">
<font><b>Whether the Investee Indian Company is Micro, Small and Medium Enterprise in terms of Micro, Small and Medium Enterprises Development (MSMED) Act, 2006 .</b></font></td>
<td width="30%"><b>Yes&nbsp;<input type="radio" value="Y" name="group" id="tr8yes" onClick="clickRadioButtons()">&nbsp;&nbsp;No&nbsp;<input type="radio" value="N" name="group" id="tr8no" onClick="clickRadioButtons()"></b></td>
</tr>
</table></div>
<div id="table6">
<table width="900" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
</table>
<table width="900" align="center" class="TDBBLRTFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle" id="test1form">
<tr><td>
<font><b>If yes, Please select the type of industry .</b></font>
</td></tr>
<tr><td ><select style="width:700px; border-radius: 5px ;" name="toi" onChange="onChange3()" id="optionvalue3"><option vlaue="Select One" default>Select One</option>

</select><td align="right"><input type="text" name="other" style="border-radius: 5px ;"/></td></td></tr></table></div>
<div id="table7">
<table width="900" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
</table>
<table width="900" align="center" class="TDBBLRTFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle" id="test1form">
<tr><td >
<font><b>If not MSMED, please confirm whether it is an industrial undertaking having an industrial license under the provisions of The Industries (Development & Regulation) Act, 1951 for items reserved for MSE Sector .</b></font>
<td width="30%"><b>Yes&nbsp;<input type="radio" value="Y" name="group1" id="tr8yes1" onClick="clickRadioButtons11()">&nbsp;&nbsp;No&nbsp;<input type="radio" value="N" name="group1" id="tr8no1" onClick="clickRadioButtons11()"></b></td>
</td></tr>
</table></div>
<div id="Answers" style="display: none;">
<table width="800" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
</table>
<table width="900" align="center" class="TDBBLRTFORM" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr>
<td class="animatedbgul" id="test1form" callspan="1" align="center"><font >Conclusion </font></td></tr>
<tr><td id="answer"></td></tr>
</table>
</div>
<table width="900" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
<tr><td>&nbsp;</td></tr>
<tr><td align="center"><button name=submit value="123" align="center" >Click Here For Conclusion</button></td></tr>

</table>
</form>
</body>
<script>
function clickRadioButtons(){
	 var yesbutton=document.getElementById("tr8yes");
	 var nobutton=document.getElementById("tr8no");
	 if(yesbutton.checked){
		 document.getElementById("table6").style.display="";
		 document.getElementById("table7").style.display="none";
		}
	
	 if(nobutton.checked){
		 document.getElementById("table6").style.display="none";
		 document.getElementById("table7").style.display="";
	 }
	 
}

function onQuestClick(id){
	//alert(id+"...");
//var id1= document.getElementById(id).value;
	var id1= document.getElementById(id);
		switch (id1.value)
	{    
	case '1':
		 //alert(id1.value+"++++++++"); 
		 document.getElementById("litag2").style.display="none";
		 document.getElementById("litag3").style.display="none";
		 document.getElementById("litag4").style.display="none";
		 document.getElementById("litag5").style.display="none";
		 document.getElementById("litag6").style.display="none";
		 document.getElementById("litag7").style.display="none";
		 document.getElementById("table1").style.display="none";
		 document.getElementById("table2").style.display="none";
		 document.getElementById("table3").style.display="none";
		 document.getElementById("table4").style.display="none";
		 document.getElementById("table5").style.display="none";
		 document.getElementById("table6").style.display="none";
		 document.getElementById("table7").style.display="none";
		 document.getElementById("Answers").style.display="";
		 document.getElementById("answer").innerHTML="<font color='red' size='4'><b>&#187;</b></font> Prohibited to invest in india.";
		 document.getElementById("quest").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '2':
         document.getElementById("litag1").style.display="none";
		 document.getElementById("litag3").style.display="none";
		 document.getElementById("litag4").style.display="none";
		 document.getElementById("litag5").style.display="none";
		 document.getElementById("litag6").style.display="none";
		 document.getElementById("litag7").style.display="none";
		 document.getElementById("table1").style.display="";
		 document.getElementById("table2").style.display="none";
		 document.getElementById("Answers").style.display="none";
		 document.getElementById("quest").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '3':
		// alert(id1.value+"++++++++");
		 document.getElementById("table1").style.display="";
         document.getElementById("litag1").style.display="none";
		 document.getElementById("litag2").style.display="none";
		 document.getElementById("litag4").style.display="none";
		 document.getElementById("litag5").style.display="none";
		 document.getElementById("litag6").style.display="none";
		 document.getElementById("litag7").style.display="none";
		 document.getElementById("Answers").style.display="none";
		 document.getElementById("quest").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '4':
		 //alert(id1.value+"++++++++");
		 document.getElementById("table1").style.display="";
         document.getElementById("litag1").style.display="none";
		 document.getElementById("litag2").style.display="none";
		 document.getElementById("litag3").style.display="none";
		 document.getElementById("litag5").style.display="none";
		 document.getElementById("litag6").style.display="none";
		 document.getElementById("litag7").style.display="none";
		 document.getElementById("Answers").style.display="none";
		 document.getElementById("quest").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '5':
		 //alert(id1.value+"++++++++");
		 document.getElementById("table1").style.display="";
         document.getElementById("litag1").style.display="none";
		 document.getElementById("litag2").style.display="none";
		 document.getElementById("litag3").style.display="none";
		 document.getElementById("litag4").style.display="none";
		 document.getElementById("litag6").style.display="none";
		 document.getElementById("litag7").style.display="none";
		 document.getElementById("Answers").style.display="none";
		 document.getElementById("quest").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '6':
		 //alert(id1.value+"++++++++");
		 document.getElementById("table1").style.display="";
         document.getElementById("litag1").style.display="none";
		 document.getElementById("litag2").style.display="none";
		 document.getElementById("litag3").style.display="none";
		 document.getElementById("litag4").style.display="none";
		 document.getElementById("litag5").style.display="none";
		 document.getElementById("litag7").style.display="none";
		 document.getElementById("Answers").style.display="none";
		 document.getElementById("quest").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '7':
		 //alert(id1.value+"++++++++");
		 document.getElementById("table1").style.display="";
         document.getElementById("litag1").style.display="none";
		 document.getElementById("litag2").style.display="none";
		 document.getElementById("litag3").style.display="none";
		 document.getElementById("litag4").style.display="none";
		 document.getElementById("litag5").style.display="none";
		 document.getElementById("litag6").style.display="none";
		 document.getElementById("Answers").style.display="none";
		 document.getElementById("quest").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;	 
	default:
        document.getElementById("litag1").style.display="";
        document.getElementById("litag2").style.display="";
		document.getElementById("litag3").style.display="";
		document.getElementById("litag4").style.display="";
		document.getElementById("litag5").style.display="";
		document.getElementById("litag6").style.display="";
		document.getElementById("litag7").style.display="";
		document.getElementById("quest").style.display="none";
	    document.getElementById("table1").style.display="none";
	    document.getElementById("table2").style.display="none";
	    document.getElementById("table3").style.display="none";
	    document.getElementById("table4").style.display="none";
	    document.getElementById("table5").style.display="none";
	    document.getElementById("table6").style.display="none";
	    document.getElementById("table7").style.display="none";
		document.getElementById("Answers").style.display="none";
		//alert(document.getElementById(id).checked);
		 var radList = document.getElementsByName('qest');
		 for (var i = 0; i < radList.length; i++) {
		 if(radList[i].checked) radList[i].checked = false;
		 }
	}	
		
}
function onQuestClick1(id){
	var id1= document.getElementById(id);
		switch (id1.value)
	{    
	case '8':
		 document.getElementById("entity9").style.display="none";
		 document.getElementById("entity10").style.display="none";
		 document.getElementById("entity11").style.display="none";
		 document.getElementById("entity12").style.display="none";
		 document.getElementById("entity13").style.display="none";
		 document.getElementById("quest1").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '9':
         document.getElementById("entity8").style.display="none";
		 document.getElementById("entity10").style.display="none";
		 document.getElementById("entity11").style.display="none";
		 document.getElementById("entity12").style.display="none";
		 document.getElementById("entity13").style.display="none";
		 document.getElementById("quest1").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '10':
         document.getElementById("entity8").style.display="none";
		 document.getElementById("entity9").style.display="none";
		 document.getElementById("entity11").style.display="none";
		 document.getElementById("entity12").style.display="none";
		 document.getElementById("entity13").style.display="none";
		 document.getElementById("quest1").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '11':
         document.getElementById("entity8").style.display="none";
		 document.getElementById("entity9").style.display="none";
		 document.getElementById("entity10").style.display="none";
		 document.getElementById("entity12").style.display="none";
		 document.getElementById("entity13").style.display="none";
		 document.getElementById("table2").style.display="";
		 document.getElementById("quest1").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '12':
         document.getElementById("entity8").style.display="none";
		 document.getElementById("entity9").style.display="none";
		 document.getElementById("entity10").style.display="none";
		 document.getElementById("entity11").style.display="none";
		 document.getElementById("entity13").style.display="none";
		 document.getElementById("quest1").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	case '13':
         document.getElementById("entity8").style.display="none";
		 document.getElementById("entity9").style.display="none";
		 document.getElementById("entity10").style.display="none";
		 document.getElementById("entity11").style.display="none";
		 document.getElementById("entity12").style.display="none";
		 document.getElementById("quest1").style.display="";
		 document.getElementById("sectorid").selectedIndex='';
		 break;
	default:
        document.getElementById("entity8").style.display="";
        document.getElementById("entity9").style.display="";
		document.getElementById("entity10").style.display="";
		document.getElementById("entity11").style.display="";
		document.getElementById("entity12").style.display="";
		document.getElementById("entity13").style.display="";
		document.getElementById("table2").style.display="none";
        document.getElementById("table3").style.display="none";
        document.getElementById("table4").style.display="none";
        document.getElementById("table5").style.display="none";
        document.getElementById("table6").style.display="none";
        document.getElementById("table7").style.display="none";
        document.getElementById("table8").style.display="none";
		document.getElementById("quest1").style.display="none";
		 var radList = document.getElementsByName('qest1');
		 for (var i = 0; i < radList.length; i++) {
		 if(radList[i].checked) radList[i].checked = false;
		 }
	}	
}

function onQuestClick2(id){
	var id1= document.getElementById(id);
		switch (id1.value)
	{    
	case '79':
		 document.getElementById("invmode82").style.display="none";
		 document.getElementById("invmode83").style.display="none";
		 document.getElementById("invmode84").style.display="none";
		 document.getElementById("invmode85").style.display="none";
		 document.getElementById("invmode86").style.display="none";
		 document.getElementById("invmode87").style.display="none";
		 document.getElementById("invmode88").style.display="none";
		 document.getElementById("table5").style.display="";
		 document.getElementById("quest2").style.display="";
		 break;
	case '80':
         document.getElementById("invmode81").style.display="none";
		 document.getElementById("invmode83").style.display="none";
		 document.getElementById("invmode84").style.display="none";
		 document.getElementById("invmode85").style.display="none";
		 document.getElementById("invmode86").style.display="none";
		 document.getElementById("invmode87").style.display="none";
		 document.getElementById("invmode88").style.display="none";
		 document.getElementById("table5").style.display="";
		 document.getElementById("quest2").style.display="";
		 break;
	case '81':
          document.getElementById("invmode81").style.display="none";
		 document.getElementById("invmode82").style.display="none";
		 document.getElementById("invmode84").style.display="none";
		 document.getElementById("invmode85").style.display="none";
		 document.getElementById("invmode86").style.display="none";
		 document.getElementById("invmode87").style.display="none";
		 document.getElementById("invmode88").style.display="none";
		 document.getElementById("table5").style.display="";
		 document.getElementById("quest2").style.display="";
		 break;
	case '82':
         document.getElementById("invmode82").style.display="none";
		 document.getElementById("invmode83").style.display="none";
		 document.getElementById("invmode81").style.display="none";
		 document.getElementById("invmode85").style.display="none";
		 document.getElementById("invmode86").style.display="none";
		 document.getElementById("invmode87").style.display="none";
		 document.getElementById("invmode88").style.display="none";
		 document.getElementById("table5").style.display="";
		 document.getElementById("quest2").style.display="";
		 break;
	case '83':
         document.getElementById("invmode82").style.display="none";
		 document.getElementById("invmode83").style.display="none";
		 document.getElementById("invmode84").style.display="none";
		 document.getElementById("invmode81").style.display="none";
		 document.getElementById("invmode86").style.display="none";
		 document.getElementById("invmode87").style.display="none";
		 document.getElementById("invmode88").style.display="none";
		 document.getElementById("table5").style.display="";
		 document.getElementById("quest2").style.display="";
		 break;
	case '84':
         document.getElementById("invmode82").style.display="none";
		 document.getElementById("invmode83").style.display="none";
		 document.getElementById("invmode84").style.display="none";
		 document.getElementById("invmode85").style.display="none";
		 document.getElementById("invmode81").style.display="none";
		 document.getElementById("invmode87").style.display="none";
		 document.getElementById("invmode88").style.display="none";
		 document.getElementById("table5").style.display="";
		 document.getElementById("quest2").style.display="";
		 break;
	case '85':
        document.getElementById("invmode82").style.display="none";
		 document.getElementById("invmode83").style.display="none";
		 document.getElementById("invmode84").style.display="none";
		 document.getElementById("invmode85").style.display="none";
		 document.getElementById("invmode86").style.display="none";
		 document.getElementById("invmode81").style.display="none";
		 document.getElementById("invmode88").style.display="none";
		 document.getElementById("table5").style.display="";
		 document.getElementById("quest2").style.display="";
		 break;
	case '86':
         document.getElementById("invmode82").style.display="none";
		 document.getElementById("invmode83").style.display="none";
		 document.getElementById("invmode84").style.display="none";
		 document.getElementById("invmode85").style.display="none";
		 document.getElementById("invmode86").style.display="none";
		 document.getElementById("invmode87").style.display="none";
		 document.getElementById("invmode81").style.display="none";
		 document.getElementById("table5").style.display="";
		 document.getElementById("quest2").style.display="";
		 break;
	default:
		 document.getElementById("invmode81").style.display="";
		 document.getElementById("invmode82").style.display="";
		 document.getElementById("invmode83").style.display="";
		 document.getElementById("invmode84").style.display="";
		 document.getElementById("invmode85").style.display="";
		 document.getElementById("invmode86").style.display="";
		 document.getElementById("invmode87").style.display="";
		 document.getElementById("invmode88").style.display="";
         document.getElementById("table5").style.display="none";
         document.getElementById("table6").style.display="none";
         document.getElementById("table7").style.display="none";
		 document.getElementById("quest2").style.display="none";
		 var radList3 = document.getElementsByName("qest2");
		 var radList4 = document.getElementsByName("group");
		 for (var i = 0; i < radList3.length; i++) {
		 if(radList3[i].checked) radList3[i].checked = false;
		 }
		 for (var i = 0; i < radList4.length; i++) {
			 if(radList4[i].checked) radList4[i].checked = false;
			 }
	}	
}


function setVisibilityArr(varArray,visibility){
    if(null != varArray){
        for(i = 0; i < varArray.length; i++){
            var tdvar = varArray[i];
            if(tdvar != null){
            tdvar.style.display=visibility;
            }
        }
    }
 }
document.body.onload = function(){
    document.getElementById("sectorid").selected='';
    document.getElementById("table1").style.display="none";
    document.getElementById("table2").style.display="none";
    document.getElementById("table3").style.display="none";
    document.getElementById("table4").style.display="none";
    document.getElementById("table5").style.display="none";
    document.getElementById("table6").style.display="none";
    document.getElementById("table7").style.display="none";
    document.getElementById("table8").style.display="none";
    var radList = document.getElementsByName('qest1');
	 for (var i = 0; i < radList.length; i++) {
	 if(radList[i].checked) radList[i].checked = false;}
	 var radList1 = document.getElementsByName('qest');
	 for (var i = 0; i < radList1.length; i++) {
	 if(radList1[i].checked) radList1[i].checked = false;}
	 var radList3 = document.getElementsByName("qest2");
	 for (var i = 0; i < radList3.length; i++) {
	 if(radList3[i].checked) radList3[i].checked = false;
	 }
}
</script>
</html>